package com.example.demo.design.abstractFactory;

/**
 * @className: ShapeFactory
 * @copyright: Copyright (C) 2019-2028, Inc. All rights reserved.
 * @company: 中兴新云.财务云
 * @author: 刘凯
 * @date: 2024/7/3
 * @Description: com.example.demo.design.abstractFactory
 */
public  class  ShapeFactory extends AbstractFactory{
    @Override
    Shape getShape(String shape) {
            if(shape == null){
                return null;
            }
            if (shape.equalsIgnoreCase("CIRCLE")) {
                return new Circle();
            }else if(shape.equalsIgnoreCase("RECTANGLE")){
                return new Rectangle();
            }else if(shape.equalsIgnoreCase("SQUARE")){
                return new Square();
            }
            return null;
        }

    @Override
    Color getColor(String color) {
        return null;
    }

}
